package br.com.busgpsapp.util;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import br.com.busgpsapp.R;

import com.actionbarsherlock.app.ActionBar;

public class CustomActionBar
{

    public static void updateActionBar(ActionBar actionBar)
    {
        createActionBar(actionBar);
    }

    public static void updateCustomActionBar(ActionBar actionBar, String subTitle)
    {
        createActionBar(actionBar);
        actionBar.setSubtitle(subTitle);
    }

    private static void createActionBar(ActionBar actionBar)
    {
        actionBar.setDisplayHomeAsUpEnabled(true);
        actionBar.setHomeButtonEnabled(true);
//        actionBar.setIcon(android.R.color.transparent);
        actionBar.setIcon(R.drawable.icon_actionbar);
        actionBar.setTitle("BusGps");
//	actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#2f6699")));
        actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#F4842D")));
    }

}
